﻿#region Copyright(C) 2018 FI Ltd. All rights reserved.
// ==================================================================================================
// Copyright(C) 2018 FI Ltd. All rights reserved.
//
// SYSTEM NAME	    : FI.Net Application Framework
// COMPONENT ID	    : FI.Core
// COMPONENT DESC   : FI.Net Core Foundation
//
// CREATED DATE/BY  : 18 Aug 2018 / Tian Mi
//
// REVISION HISTORY :	
// DATE/BY			SR#/CS/PM#/OTHERS		DESCRIPTION OF CHANGE
// ==================================================================================================
#endregion

using FI.Core.IoC;
namespace FI.Core.Caching
{
    /// <summary>
    /// A fake cache store which will never perform any caching operation.
    /// </summary>
    [MapTo(typeof(ICacheStoreFactory), -1)]
    public class FakeCacheStoreFactory: ICacheStoreFactory
    {

        /// <summary>
        /// Gets the cache store.
        /// </summary>
        /// <param name="keyPrefix">The key prefix.</param>
        /// <param name="priority">The priority.</param>
        /// <param name="expirationMode">The expiration mode.</param>
        /// <param name="expirationTime">The expiration time.</param>
        /// <param name="timeFormat">The time format.</param>
        /// <param name="dependentFilePath">The depedent file path.</param>
        /// <returns>cache store.</returns>
        public ICacheStore GetCacheStore(string keyPrefix, CacheItemPriority priority, CacheItemExpirationMode expirationMode, System.TimeSpan? expirationTime, string timeFormat, string dependentFilePath)
        {
            return new FakeCacheStore();
        }
    }
}
